home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / COMTXT2.BC < prev    next >
Text File  |  1990-10-15  |  2KB  |  73 lines

  1. echo off
  2. let %!a = %1
  3. if %!a# = # GOTO HELP
  4. GOTO TEST2
  5. :TEST2
  6. let %!b = %2
  7. upper %!b
  8. if %!b# = # GOTO HELP
  9. let %!e = %!a
  10. let %!s = %!a
  11. IF NOT EXIST %!e GOTO HELP2
  12. filesize %!s
  13. let %!z = %!s
  14. gt %!s 63900
  15. if errorlevel 1 goto ERROR
  16. rem note:  some text editors are capable of editing a comtxt created file,
  17. rem note:  however, the first line must NEVER be changed, moved or deleted.
  18. rem rem   23 208 229  2  241
  19. rem rem   │172│208│ 7 │ 33│205
  20. rem rem   │ │ │ │ │ │ │ │ │ │
  21. rem rem   v v v v v v v v v v
  22. rem echo ╛¼è╨÷╨4σt┤═!δ±É═  >com····.tmp
  23. rem rem  ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
  24. rem rem  │ │ │ │ │ │ │ │ │ │ │
  25. rem rem  │ 1 │246│116│205│144│
  26. rem rem 190 138  52 180 235  32
  27. echonolf \\190\\23\\1\\172\\138\\208\\246\\208\\52\\229\\116\\7\\180>com····.tmp
  28. echonolf \\2\\205\\33\\235\\241\\144\\205\\32>>com····.tmp
  29. echo \\32>>com····.tmp
  30. copy com····.tmp /b + %!a /a %!b.com
  31. erase com····.tmp
  32. echo Program's Syntax is--:  %!b [\\124Pipe [Filter]] [\\62Redirect [PRN/File.Ext]]
  33. echo.
  34. echo %!b, by itself, acts like the DIR command without /W or /P options.
  35. echo.
  36. echo You may use Ctrl-S to toggle pause the STDOUT display and Ctrl-C to abort.
  37. echo.
  38. echo You may wish to use LZEXE on %!b to save on space storage.
  39. GOTO END
  40. :HELP
  41. ECHO Syntax---:  COMTXT [Source.Ext] [Comname]
  42. ECHO Usage----:  Creates a .COM screen file from any pure text file that
  43. ECHO             does not exceed 63,900 bytes.
  44. ECHO.
  45. ECHO             Note:  the resultant .COM file can be copied to most
  46. ECHO                    printers without adverse effects. It also may
  47. ECHO                    be edited directly with some text editors.
  48. ECHO                    Just be sure NOT to change, move, or delete
  49. ECHO                    the first line since it will no longer execute.
  50. ECHO.
  51. ECHO             [Source.Ext] MUST be a pure ascii text file
  52. ECHO             [Source.Ext] can include box graphics (▒,╠,═,╡, etc)
  53. ECHO             [Comname] MUST NOT include an extension (.COM is added)
  54. ECHO.
  55. ECHO                                TIP
  56. ECHO DIR C:\MM\DRAWER\*.DOC \\124 SORT \\62 Textemp.Txt
  57. ECHO COMTXT Textemp.Txt DOCS
  58. ECHO DOCS
  59. ECHO DOCS \\62 PRN
  60. GOTO END
  61. :ERROR
  62. echo %!a has %!z bytes which excedes the 63,900 limit!
  63. echo.
  64. waitkey 2
  65. goto HELP
  66. :HELP2
  67. echo Unable to locate a file named %!a\\33
  68. echo.
  69. waitkey 2
  70. goto HELP
  71. :END
  72.  
  73.